def counting_sort(array):
    a=max(array)
    b=min(array)
    length=a-b+1
    counts=[0]*length
    for number in array:
        counts[number-b]+=1
    index=0
    for i in range(length):
        for j in range(counts[i]):
            array[index]=i+b
            index+=1

sequence=[12,27,46,16,25,37,22,29,15,47,48,34]
print(sequence)
counting_sort(sequence)
print(sequence)
